﻿@model Unijovem.UI.Models.EnqueteModel

@{
    ViewBag.Title = "Manter";
}

<script type="text/javascript">
    $(function () {
        var dataExpiracao = $("#DataExpiracao");
        var dataExibicaoInicio = $("#DataExibicaoInicio");
        var dataExibicaoFinal = $("#DataExibicaoFinal");

        dataExpiracao.datepicker({ dateFormat: 'dd/mm/yy' });
        dataExibicaoInicio.datepicker({ dateFormat: 'dd/mm/yy' });
        dataExibicaoFinal.datepicker({ dateFormat: 'dd/mm/yy' });

        dataExpiracao.val(dataExpiracao.val().substring(0, 10));
        dataExibicaoInicio.val(dataExibicaoInicio.val().substring(0, 10));
        dataExibicaoFinal.val(dataExibicaoFinal.val().substring(0, 10));
    });
</script>

<h2>Manter</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>EnqueteModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataExpiracao)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DataExpiracao, new { @maxlength = 10 })
            @Html.ValidationMessageFor(model => model.DataExpiracao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataExibicaoInicio)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DataExibicaoInicio, new { @maxlength = 10 })
            @Html.ValidationMessageFor(model => model.DataExibicaoInicio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataExibicaoFinal)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DataExibicaoFinal, new { @maxlength = 10 })
            @Html.ValidationMessageFor(model => model.DataExibicaoFinal)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Pergunta)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Pergunta, new { @maxlength = 255 })
            @Html.ValidationMessageFor(model => model.Pergunta)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlternativaA)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.AlternativaA, new { @maxlength = 100 })
            @Html.ValidationMessageFor(model => model.AlternativaA)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlternativaB)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.AlternativaB, new { @maxlength = 100 })
            @Html.ValidationMessageFor(model => model.AlternativaB)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlternativaC)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.AlternativaC, new { @maxlength = 100 })
            @Html.ValidationMessageFor(model => model.AlternativaC)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlternativaD)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.AlternativaD, new { @maxlength = 100 })
            @Html.ValidationMessageFor(model => model.AlternativaD)
        </div>
        @if (Model != null)
        {
            @Html.HiddenFor(model => model.Id)
        }
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

